v5 (#1097)#1106
Conversation
|
Important Review skippedToo many files! This PR contains 288 files, which is 138 over the limit of 150. To get a review, narrow the scope: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (12)
📒 Files selected for processing (288)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
License Audit
Weak Copyleft Packages (informational)
Resolved Packages (11)
|
* wip * remove unused hook * Add collapse sidebar button * refactor settings into sidebar as a override context * chat thread styling * notification dot * improved rendering * fix light mode * imporved api key page * add chats page * not found nit * guest sidebar footer * add tooltip for sidebar collapse button * nit * onboard nit * fix permission sync banner * what's new * profile settings * home view settings * general settings * remove shadow * changelog * feedback
* wip on service ping
* add concept of License to the database and wire it into the enitlements system
* wip on e2e checkout flow
* basic card to display current plan
* store activation code at rest
* add manage subscription button
* wip on lighthouse client
* wip on lighthouse client
* remove the concept of a plan and just rely on entitlements at the app layer
* fix sidebar
* add temporary refresh license button
* clarified org availability design
* entitlements naming nit
* remove concept of a GUEST user
* remove anonymous-access entitlement
* change offline license to support optional seats
* handle license validation for all paths
* refactor some actions
* add explicit service ping calls to user <> organization update paths
* fix refresh bug with sidebar
* add billing details card
* fix invite redemption when user already a member
User was hitting a unique constraint on UserToOrg(orgId, userId) when
redeeming an invite, because onCreateUser auto-joins new signups in
self-serve mode and redeemInvite then tried to create the same row.
Make the insert idempotent via upsert so the downstream AccountRequest
and invite cleanup still runs.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* wip on license card
* further wip on license card / activaction code card
* add recent invoices UI
* nit on seats terminology
* feat(web): surface subscription cancellation on license card
Adds cancelAt to the License model and the lighthouse ping schema, and
renders "Cancels on <date>" on the current plan card when there's no
upcoming renewal. Prefers "Next renewal" when Stripe still has an
upcoming invoice — so subscriptions scheduled to end after the next
billing cycle keep showing the renewal row.
Also makes nextRenewalAt / nextRenewalAmount nullable to match the
lighthouse response, and guards new Date() against null in servicePing.
Adds a CLAUDE.md under the lighthouse feature folder pointing at the
service repo so the two schemas stay in lockstep.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(web): add offline license card to settings
Renders a dedicated card for offline (SOURCEBOT_EE_LICENSE_KEY) licenses
showing the license id, seat cap, and expiry. When an offline license
is present, the page skips the online license lookup entirely to mirror
the precedence in entitlements.ts.
Also adds a header row with a mailto link to support and an "All plans"
shortcut to the public pricing page.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(web): banner system for license + permission sync
Introduces a priority-ordered, single-slot banner system under
(app)/components/banners/. A server-side resolver picks the highest-priority
banner that matches the current context (role, license state, offline
license, permission-sync status) and renders it through a shared BannerShell
that handles per-day dismissal via cookies.
Banners included:
- License expired (everyone, non-dismissible, role-aware copy)
- License expiry heads-up (owner, dismissible, 14d window, uses
formatDistance for relative copy)
- Invoice past due (owner, non-dismissible)
- Permission sync pending (everyone, non-dismissible, migrated from the
prior standalone component through BannerShell)
Precedence mirrors entitlements.ts: offline license is the sole source
of truth when present, so online billing state is ignored.
Also splits getValidOfflineLicense into a decode-only path so
getOfflineLicenseMetadata can surface expired licenses to the UI.
Includes bannerResolver.test.ts covering priority, audience filtering,
dismissal filtering, offline/online expiry rules, and permission sync.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* handle failure case where lighthouse cannot be reached
* chore(web): mirror lighthouse trial + checkout schema changes
Adds trialEnd to the ping response schema and installId / requestTrial
to the checkout request schema so types match the lighthouse service.
createCheckoutSession passes the instance's SOURCEBOT_INSTALL_ID and
defaults requestTrial to false (the existing "upgrade" button is not
a trial path).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(web): trial banner + plumbing
Adds a trial banner to the owner-facing banner stack and the
surrounding plumbing:
- Schema: License.trialEnd, License.hasPaymentMethod, Org.trialUsedAt
(durable flag that survives license deactivation). Two migrations.
- servicePing persists trialEnd / hasPaymentMethod and flips
Org.trialUsedAt on first trial sync.
- Trial banner (owner, dismissible, priority 25): title uses
formatDistance ("Your trial ends in 10 days"); copy + action branch
on hasPaymentMethod. With-PM variant links to /settings/license;
no-PM variant opens the Stripe portal via a new
OpenBillingPortalButton (LoadingButton + createPortalSession).
- currentPlanCard gains a "Trial ends on" fallback column for the
trial-without-PM case (where nextRenewalAt is null).
- activationCodeCard accepts isTrialEligible and flips its checkout
button from "Purchase a license" to "Start a free trial" when the
org hasn't trialed yet, passing requestTrial through to the checkout
endpoint.
- Types mirror the new lighthouse fields (trialEnd, hasPaymentMethod)
and the checkout request additions (installId, requestTrial).
Side-trips to Stripe (portal, checkout) now append ?refresh=true so
the license resyncs on return; trial-checkout also appends
?trial_used=true so Org.trialUsedAt flips immediately (closes the UX
gap between checkout completion and activation-code entry). page.tsx
handles both params, preserves any other query params, and redirects
to a clean URL.
Also: fetchWithRetry now only retries 5xx, 408, and 429 — 4xx errors
(e.g. TRIAL_ALREADY_USED at 409) propagate immediately instead of
retrying pointlessly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* add badges to invoice cards
* add basic billing docs
* refactor(lighthouse): throw ServiceErrorException on ping failure
syncWithLighthouse previously swallowed ping errors with a log and early
return, which masked real problems. Flip the model: on a lighthouse
ServiceError response, throw ServiceErrorException. The sew() middleware
already knows how to marshal that into an API response for user-initiated
paths.
Callers fall into two camps:
- Propagate (user-initiated): activateLicense and refreshLicense. The
existing try/catch in activateLicense now correctly rolls back the
license row when lighthouse rejects the activation code; refreshLicense
lets the throw propagate so the UI surfaces a toast.
- Swallow explicitly (background / side-effect): license page load, the
24h cron, user-approval, and signup paths all wrap with
`.catch(() => { /* ignore */ })`. These happen as a side effect of
other successful operations; a ping failure shouldn't block them.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feedback
* fix tests
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* wip on reactivation flow * add banner for license bound to another instance error case
* s * changelog
* wip on upsell dialog * rename to upsell dialog * use dynamic prices * further polish w.r.t., how we hydrate the client with offer information * feedback
Swap "Finalizing your purchase" for "Activating your license" so the copy reads correctly for both paid checkouts and trial starts (the same dialog drives both flows). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s when applicable (#1239) * s * feedback
* Add ask MCP server integration * Merge MCP user server credentials * Inject Prisma into MCP OAuth provider * Scope MCP user server queries * Add org-approved MCP servers * feat(web): add workspace MCP configuration * fix(web): allow MCP cleanup without OAuth entitlement * feat(web): improve MCP server add flow * fix(web): check DCR for prefab MCP servers * feat(web): support static OAuth MCP credentials * feat(web): add more prefab MCP servers * fix(web): use official Atlassian MCP icons * fix(web): use Atlassian prefab MCP server * feat(web): connect approved MCP servers from chat * feat(web): redesign MCP servers settings page Rework the MCP servers page with a cleaner, more compact layout: - Split servers into Connected / Suggested sections - Add search bar with All / Connected filter tabs - Compact card design with smaller favicons, stripped URLs, quieter status indicators - Move Reconnect into three-dot overflow menu alongside new Disconnect option - Add disconnectMcpServer server action to remove a user's MCP credentials - Extract useConnectMcp hook for shared connect/reconnect logic * Rename MCP settings to Ask Agent connectors * feat(web): redesign workspace Ask Agent settings page Redesign the workspace Ask Agent page with card-based layout, 3-stat strip, connector rows with status indicators, kebab menu, and Connect button with OAuth flow. Extract shared ConnectorRowInfo component for reuse between workspace and account settings pages. * feat(web): add workspace connector config link to chat toolbar Add "Configure connectors" link to the chat toolbar's Connectors submenu, pointing to /settings/workspaceAskAgent for workspace-level connector management. Keep existing "Manage connectors" link to /settings/accountAskAgent for personal connector setup. * Add MCP connector tool metadata * feat(web): redesign MCP tools list as compact clickable badges Replace the full-card tool list with a compact badge grid. Clicking a badge reveals that tool's detail panel inline; only one detail is visible at a time. Also remove the focus ring from the tools trigger button. * refactor(web): extract shared ConnectorCard component Unify the duplicated card layout between AccountConnectedConnectorCard and WorkspaceConnectorCard into a single ConnectorCard component that owns the Collapsible state, Card shell, ConnectorRowInfo, and tool disclosure wiring. The divergent parts (status badge, action buttons) are passed as ReactNode slots. * Fix Ask approval turn progress state * Add MCP connector usage counters * Address MCP review feedback * Remove workspace Ask Agent connector summary cards * Add PostHog prefab MCP server * Add Ask MCP PostHog metrics * Add Ask MCP tool call analytics * Add Ask MCP connector lifecycle analytics * Fix v5 rebase follow-ups * Clean up Ask MCP deployment references * Move EE MCP feature under chat * Simplify static MCP OAuth HTTPS guard * docs: v5 docs updates (#1244) * [v5] feat(web): Add usage information for yearly subs (#1245) * schema * feat * fix build errors after merge * fix bug where Ask doesn't load if we dont have a license key * refactor(web): clean up MCP OAuth provider * Prisma Migrations * Address various review feedback --------- Co-authored-by: Jack Minnetian <270441393+BlueBottleLatte@users.noreply.github.com> Co-authored-by: Michael Sukkarieh <michael.sukkarieh@mail.mcgill.ca>
| } | ||
|
|
||
| function removeHtmlTags(value: string): string { | ||
| return value.replace(/<[^>]*>/g, ''); |
No description provided.